package rxt.huiyi.com.rxterfit.module.app;

import javax.inject.Singleton;

import dagger.Module;
import dagger.Provides;
import rxt.huiyi.com.rxterfit.ActivityScope;
import rxt.huiyi.com.rxterfit.MainActivity;
import rxt.huiyi.com.rxterfit.presenter.Url1Presenter;
import rxt.huiyi.com.rxterfit.view.IShowData;

/**
 * Created by huiyi on 2017/5/8.
 */
@Module
@ActivityScope
public class Url1Module {

    private MainActivity activity;
    private IShowData review;

    public Url1Module(MainActivity activity, IShowData review) {
        this.activity = activity;
        this.review = review;
    }

    @Provides
    @Singleton
    public MainActivity provideMainActivity() {
        return activity;
    }

    @Provides
    @ActivityScope
    public Url1Presenter getPresenter() {
        return new Url1Presenter(activity,review);
    }

}
